package com.aaa.service.impl;

import com.aaa.dao.S_LoginDao;
import com.aaa.entity.Emp;
import com.aaa.entity.Massage;
import com.aaa.service.S_EmpService;
import com.aaa.util.EmpUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class S_EmpServiceImpl implements S_EmpService {
    @Autowired
    S_LoginDao dao;
 /*   @Override
    public Boolean login(Emp emp) {
        List<Emp> list=dao.login(emp);
        if (list.size()>0){
            EmpUtil.setEmp(list.get(0));
            return  true;
        }
        return false;
    }
*/
    @Override
    public Massage session(Map map) {
        return dao.session(map);
    }

    @Override
    public Boolean login(Map map1) {
        List<Emp> list=dao.login(map1);
        if (list.size()>0){
            EmpUtil.setEmp(list.get(0));
            return  true;
        }
        return false;
    }

    @Override
    public Emp selectEmp(Map map1) {
        return dao.selectEmp(map1);
    }
}
